package test.com.flexoop.utilities.dateutils {
	import com.flexoop.utilities.dateutils.DateUtils;
	
	import org.flexunit.Assert;
	

	public class DateFormatTest {

		public function DateFormatTest() {
		}
		
		[Test]
		public function testShortDate():void {
			Assert.assertEquals( 'short date mask format test', '05/02/07', DateUtils.dateFormat( new Date( 2007, 4, 2 ), DateUtils.SHORT_DATE_MASK ) );
		}
		
		[Test]
		public function testMediumDate():void {
			Assert.assertEquals( 'medium date mask format test', 'Jan 1, 2003', DateUtils.dateFormat( new Date( 2003, 0, 1 ), DateUtils.MEDIUM_DATE_MASK ) );
		}
		
		[Test]
		public function testLongDate():void {
			Assert.assertEquals( 'long date mask format test', 'December 25, 2004', DateUtils.dateFormat( new Date( 2004, 11, 25 ), DateUtils.LONG_DATE_MASK ) );
		}
		
		[Test]
		public function testFullDate():void {
			Assert.assertEquals( 'full date mask format test', 'Sunday, June 15, 2008', DateUtils.dateFormat( new Date( 2008, 5, 15 ), DateUtils.FULL_DATE_MASK ) );
		}
		
		[Test]
		public function testCustomDate():void {
			Assert.assertEquals( 'custom date mask format test', '11/13/2006', DateUtils.dateFormat( new Date( 2006, 10, 13 ), 'MM/DD/YYYY' ) );
		}

	}
}